function [] = pressmsg(h_obj, call_num);

% PRESSMSG - determines the type of object callback after mouse click
%
%    PRESSMSG(GCBO, 1) returns 'ButtonDownFcn' for the callback object.
%
%    PRESSMSG(GCBO, 2) returns 'WindowButtonDownFcn' for the callback object.
%
%    PRESSMSG(GCBO, 3) returns 'WindowButtonUpFcn' for the callback object.
%
%    PRESSMSG(GCBO, 4) returns 'WindowButtonMotionFcn' for the callback object.

% By:   S.C. Molitor (smolitor@med.unc.edu)
% Date: May 16, 2000

switch (call_num)
case 1
   call_string = 'ButtonDownFcn';
case 2
   call_string = 'WindowButtonDownFcn';
case 3
   call_string = 'WindowButtonUpFcn';
case 4
   call_string = 'WindowButtonMotionFcn';
otherwise
   call_string = 'Unknown';
end

obj_type = get(h_obj, 'Type');
msgbox(sprintf('%s %s called from %s', get(gcf, 'SelectionType'), call_string, obj_type), 'PRESS MESSAGE', 'warn');
return
